package com.example.mapper.configuration;

import com.example.bean.configuration.PingGuMoBan;
import com.example.bean.configuration.vo.PingGuMoBanVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PingGuMoBanMapper {

    List<PingGuMoBan> getpage(PingGuMoBanVo vo);

    Integer addpinggumoban(PingGuMoBan pingGuMoBan);
    @Select("select * from moban where noid = #{aid}")
    PingGuMoBan getId(String aid);
    @Update("update moban set moban_name = #{mobanname}, status = #{status}, miaoshu = #{miaoshu}, update_date = #{updatedate} where noid = #{noid}")
    Integer xiugai(PingGuMoBan pingGuMoBan);
    @Update("update moban set status = 0 where noid = #{noid}")
    Integer qidong(String noid);
    @Update("update moban set status = 1 where noid = #{noid}")
    Integer jinyong(String noid);

    int dels(List<String> ids);
    @Select("select noid, moban_name from moban")
    List<PingGuMoBan> moban();
}